# -*- coding: utf-8 -*-
"""
created on 2017/12/15 13:57

@author: didichen
"""

from collections import Counter
import types


def closest(strng):
    if strng == "":
        return []
    strng_list = strng.split(' ')
    in_list = []

    min = 65535
    for item in strng_list:
        in_list.append(sum(int(x) for x in item))
    x = 0
    y = 0
    for x_index in range(len(in_list)):
        for y_index in range(x_index + 1, len(in_list) - x_index):
            if min > abs(in_list[x_index] - in_list[y_index]):
                min = abs(in_list[x_index] - in_list[y_index])
                x = x_index
                y = y_index
    return [[in_list[x], x, int(strng_list[x])], [in_list[y], y, int(strng_list[y])]]


if __name__ == '__main__':
    print(closest("456899 50 11992 176 272293 163 389128 96 290193 85 52"))
    print(closest(""))
